import axios from 'axios';
import { apiBaseUrl } from '../utils/conts';


export const instance = axios.create({
  baseURL: apiBaseUrl,
  withCredentials: true,
});

const authInterceptor = (config) => {
  config.headers.authorization = `${localStorage.getItem('token')}}`;
  return config;
};

instance.interceptors.request.use(authInterceptor);
